/*****************************************************************
**                                                              **
**  Copyright (C) 2004 Amlogic,Inc.                             **
**  All rights reserved                                         **
**        Filename : aw_avi_app.c /Project:AVOS                ** 
**        Revision : 1.0                                        **
**                                                              **
*****************************************************************/
#ifndef __AW_AVI_APP_H_
#define __AW_AVI_APP_H_

#include "includes.h"
#include "aw_windows.h"
#include "app.h"
#include "datasrc.h"
#include "avi_define.h"
#include "ioapi.h"
#include "aw_avi_key.h"
#include "user.h"
#include "logo_dat.h" 

typedef enum
{
	NO_SUBPIC = 0,
	SUBPIC_OFF,
	SUBPIC_ON
}AVI_SUB_t;

extern aviinfo_t extAviInfo ;
extern AVI_SUB_t subpic_status ;

extern Playlist_t *avi_playlist;

void AWAVIQuitProcess(void);

void AviSetSubOn(INT8U flag) ;

INT8U AviCmdResponse(AWMSG *pMsg, PCMDSET cmd_set) ;

extern int PlayAVIFile(char *file_name);

void AWAVIKeyDo(INT32S key) ;

extern void AWAVIKeyProcess(AWMSG *pMsg);

void AWAVINotificationProcess(AWMSG *pMsg) ;

extern void AWAVIMsgProcess(AWMSG *pMsg);

extern int RunAVIPlayer(Playlist_t *playlist);

int PreviewAviPlayer(char *filename);
extern INT8U GetAVIInfo(char *file_name, VIDEO_INFO *video_info);
void avi_play_preview(char *filename) ;
INT32S UpdateAviSub(void); 
void SetWinDivx_SubTitlePalette_4(short pattern, short background, short emphasis1, short emphasis2);
void SetSubpicStatus(AVI_SUB_t status);

typedef struct avi_fileinfo{
	double totaltime;
	unsigned    video_codec;
	unsigned 		video_kbps;
	unsigned    audio_kbps;
	unsigned    width;
	unsigned    heigth;
	unsigned    audio_codec;
	unsigned    audio_channels;
}AVIINFO;

#endif //__AW_AVI_APP_H_

